package com.qianfeng.dbsm.common;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author Chance
 */
@RestControllerAdvice
public class MyExceptionHandler {
    @ExceptionHandler(RuntimeException.class)
    public ResponseData handler(RuntimeException e){
        return ResponseData.fail(e.getMessage(),null);
    }
}
